package com.thunbu.lib_common.config;

/**
 * @author cong
 * @since 2019-05-28 14:50
 */
public class BaseResponse<T> {
    public static final int SUCCESS_CODE = 200;
    /**
     * 状态码
     */
    private int code;
    /**
     * 信息
     */
    private String message;
    /**
     * 具体返回数据
     */
    private T data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess(){
        return code == SUCCESS_CODE;
    }
}
